﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


//定义一个员工类，存放用户的工号、姓名和部门信息；定义两个构造函数，一个是无参；
//一个有参构造函数，对类的属性进行初始化。
namespace ConsoleApp1
{
    class YuanGong
    {
        public YuanGong(string ID, string Name, string Section)
        {
            this.ID = ID;
            this.Name = Name;
            this.Section = Section;
        }
        private string ID;
        private string Name;
        private string Section;

        public string IID
        {
            get { return this.ID; }
            set { this.ID = value; }

        }
        public string NName
        {
            get { return this.Name; }
            set { this.Name = value; }
        }
        public string SSection
        {
            get { return this.Section; }
            set { this.Section = value; }
        }
        public void Write()
        {
            Console.WriteLine("工号为{0},姓名为{1}，部门为{2}部",ID,Name,Section);
        }


    }
}
